Repository navigation
Add mcp-bridge: use any MCP server's tools by voice - #391
Merged
Merged
Conversation
Connects to one user-chosen MCP server (URL and optional bearer token in Settings, API Keys) and routes spoken requests to its tools. - Speaks MCP 2026-07-28 stateless Streamable HTTP, with automatic fallback to the 2025-11-25 initialize/session handshake - JSON and SSE replies, tools/list pagination, x-mcp-header mirroring - Read-only tools run directly; anything else is confirmed by voice with a chance to change the details - https only, no redirects, private and metadata addresses refused - Tool descriptions and output are fenced as untrusted data
- Ask for all missing fields in one prompt, with one follow-up at most - Greeting without tool counts; spoken output capped at 30 words with plain-spoken-English instructions; natural dates; no emails read out - Wider exit and yes phrase lists; natural examples in the router - Context-aware, non-repeating fillers; plain error wording - Read user_profile.md, user_summary.md, memory_mirror_corrections.md, Social Memory names, get_region_data() and get_timezone() instead of asking; any value taken from them always goes through the spoken confirmation, even for read-only tools
Contributor
✅ Community PR Path Check — PassedAll changed files are inside the |
Contributor
🔀 Branch Merge CheckPR direction: ✅ Passed — |
Contributor
✅ Ability Validation Passed |
Contributor
🔍 Lint Results✅
|
- Put the ability class first in main.py. - Drop the socket and urllib imports; parse URLs with a small helper. - Ask before sending a saved detail even when it's inside a longer value. - Log the server host only, since some servers put the key in the path. - Say a short filler while connecting, and read event streams as UTF-8.
Contributor
|
Hello @hassan1731996, thanks for this, really solid work, especially on the safety side. I pushed a few fixes to this branch:
Worth a follow-up:
|
uzair401
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this Ability do?
MCP Bridge connects the speaker to one MCP server the user chooses and lets them use every tool on it by voice. The user adds the server's address, and a token if it needs one, under Settings, API Keys. MCP Bridge then lists the server's tools, picks the right one for what the user says, fills in the details, and speaks back a short answer. Nothing has to be set up per tool. One Zapier MCP server alone reaches thousands of apps.
No existing ability or template uses MCP.
MCP Bridge finds a hosted server's tools by itself, through the open standard. The README covers the differences.
Suggested Trigger Words
Type
External APIs
mcp_server_url(required) andmcp_server_token(optional, sent asAuthorization: Bearer), both read withget_api_keys(). These public servers need no key and work for testing:https://docs.mcp.cloudflare.com/mcp,https://mcp.deepwiki.com/mcp.Testing
Live Editor spike. A throwaway spike ran in the Live Editor and confirmed the sandbox supports everything this needs:
socket.getaddrinforequestsstreaming withallow_redirects=FalseThe full ability has since been tested in the Live Editor and works.
Offline tests (103 scripted cases). These run against a fake MCP server in three modes: modern JSON, modern SSE, and the legacy session handshake. They cover:
x-mcp-headertoolsLive checks against real servers. I also ran the transport against DeepWiki, Cloudflare Docs and Hugging Face. All three connect and their tool calls work (4 to 9 seconds). Zapier without a token gives the "needs sign-in" message.
Checklist
community/mcp-bridge/main.pyfollows SDK pattern (extendsMatchingCapability, hasregister_capability+call)README.mdincluded with description, suggested triggers, and setupresume_normal_flow()called on every exit pathprint()— usingeditor_logging_handlerredis,user_config)asyncio.sleep()orasyncio.create_task()— usingsession_tasksAnything else?
Protocol
MCP-Protocol-Version,Mcp-MethodandMcp-Name, base64 header values for non-ASCII names, andMcp-Param-*mirroring forx-mcp-header.initialize/Mcp-Session-Idhandshake, following the spec's era-detection rules, and caches which one the server uses.tools/listpagination.Safety
Following earlier review feedback
does_match(); triggers live in the dashboard.create_key, thenupdate_key, checkingsuccess. Reads unwrap["value"], and a failed read blocks saves.asyncio.to_thread. Nogather, no PEP 604 annotations.user_profile.md,user_summary.md,memory_mirror_corrections.md(Memory Mirror) and the names insocial_memory.json(Social Memory; its private snippets are skipped).get_region_data(), andget_timezone()with a UTC fallback.